/*
 * ShipStatus.cpp
 *
 *  Created on: Nov 8, 2011
 *      Author: gonzalo
 */

#include "ShipStatus.h"

ShipStatus::ShipStatus(DTOShipStatus* shipStatus){
	this->owner = shipStatus->getOwner();
	this->imagen = shipStatus->imagen;
	this->velRotacion = shipStatus->velRotacion;
	this->velMaxima = shipStatus->velMaxima;
	this->propulsion = shipStatus->propulsion;
	this->friccion = shipStatus->friccion;
	this->duracionBala = shipStatus->duracionBala;
	this->propulsion = shipStatus->propulsion;
	this->angle = shipStatus->angle;
	this->posX = shipStatus->posX;
	this->posY = shipStatus->posY;
}


ShipStatus::ShipStatus(std::string owner, std::string imagen, float velRotacion,	int velMaxima,
					int propulsion, int friccion, int duracionBala,int angle,
					int posX, int posY) {
	this->owner = owner;
	this->imagen = imagen;
	this->velRotacion = velRotacion;
	this->velMaxima = velMaxima;
	this->propulsion = propulsion;
	this->friccion = friccion;
	this->duracionBala = duracionBala;
	this->angle = angle;
	this->posX = posX;
	this->posY = posY;

}


DTOShipStatus* ShipStatus::transformInDTO(){
	return new DTOShipStatus(owner,imagen,velRotacion,velMaxima,propulsion,friccion,duracionBala,angle,posX,posY);
}


void ShipStatus::setOwner(std::string realOwner){
	owner = realOwner;
}

std::string ShipStatus::getOwner(){
	return owner;
}
int ShipStatus::getPosX(){
	return posX;
}
int ShipStatus::getPosY(){
	return posY;
}

ShipStatus::~ShipStatus() {}

int ShipStatus::getDuracionBala() const
{
    return duracionBala;
}

int ShipStatus::getFriccion() const
{
    return friccion;
}

std::string ShipStatus::getImagePath() const
{
    return imagen;
}

int ShipStatus::getPropultion() const
{
    return propulsion;
}

int ShipStatus::getVelMax() const
{
    return velMaxima;
}

float ShipStatus::getVelRotacion() const
{
    return velRotacion;
}

int ShipStatus::getAngle() const {
	return angle;
}

void ShipStatus::setAngle(int angle) {
	this->angle = angle;
}


void ShipStatus::updatePosition(int xPosition,int yPosition){
	this->posX = xPosition;
	this->posY = yPosition;
}

